Skip to content

Search every pane's output at once - #27

Open
srozen wants to merge 1 commit into
mainfrom
search-all-panes
Open

srozen wants to merge 1 commit into
mainfrom
search-all-panes

Conversation

@srozen

@srozen srozen commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Closes #21. ⇧⌘F opens the Commands sidebar on All Panes: the commands of every pane in every window, with what they printed, under the pane they ran in. Click one and Codec goes there, to the line that matched, with Find open on the same query so ⌘G walks the rest. A switch at the top of the sidebar, This Pane / All Panes, does the same with the mouse, and the filter gains Find's Aa / ab / .* toggles.

Screenshots

The sidebar's new scope switch and match options, over a command's output.

The Commands sidebar with This Pane / All Panes and the Aa ab .* toggles

Codec with the sidebar beside a session

Summary

⇧⌘F (menu, palette, terminal right-click) → sidebar shown, scope All Panes, keyboard in the filter
All Panes rows:
  Window 1 › api › left · ~/code/api      # window when several, tab, SplitLayout.placeNames, folder
    ✗ npm test                 14:02
      Error: connect ECONNREFUSED …       # CapturedOutput.firstMatch → excerpt; lines around it on hover
click / Return
  → TerminalWindowController.goToCommand: window to front, select tab, focus pane
  → Pane.reveal(entry, matching: expression) → row of the match
  → TerminalFinder.open(query:options:from: row)   # current match on that line, ⌘G goes on
  not in the scrollback → output viewer instead
  • Filter: TimelineFilter (query, FindOptions, ⚠) replaces the plain-text query everywhere: the list, going to a command, and the output viewer's highlights. Matching no longer ignores accents, as Find doesn't.
  • Toggles: FindOptionToggles is pulled out of the find bar and shared with the sidebar.
  • Keeping up: the list listens to every listed pane's timeline. Windows post panesDidChange when panes open or close, so it follows panes in other windows too.
  • In All Panes: arrow keys only move the selection, since going can switch tabs and windows. Insert Command and Run Again use the focused pane.
  • Fix: Pane.rows(of:) forgot a command's place when its pane had no window to measure rows in, as in a tab that isn't selected. Searching every pane would have done that to every background pane.
  • Not done: the issue mentions a project filter, which the sidebar doesn't have; it's left out.

Testing

  • swift build -j 2 --build-tests, swift test -j 2 --skip-build (571 tests pass) and the universal scripts/build-app.sh release.
  • New: filter options and invalid patterns, the match with its context and excerpt, place names, the ⇧⌘F menu item, the pane's context menu, and an end-to-end search with zsh over three panes in two tabs, going to the other tab with Find open on the matching line.
  • Screenshots retaken with make screenshots.

🤖 Generated with Claude Code

Finding where an error went by meant ⌘F in each pane, in each tab. The
Commands sidebar's filter already searched commands and what they
printed, but for one pane. It now has a scope switch, This Pane / All
Panes, and ⇧⌘F (Edit › Find › Find in All Panes…, the palette, the
terminal's context menu) opens it on All Panes with the keyboard in the
filter.

All Panes lists the commands of every pane in every window, under a
heading for the pane: its window when there are several, its tab, where
it is in the tab ("left", "top right", from SplitLayout.placeNames) and
its folder. Panes restored at launch come with their commands. What's
searched is each command's line and the output kept when it finished, so
a pane a full-screen program has taken over is searched too.

The filter now has Find's Aa, ab and .* toggles, in both scopes, shared
with the find bar as FindOptionToggles. TimelineFilter carries the query,
the options and ⚠; CapturedOutput.firstMatch gives the line that matched
with the lines around it, and a row shows that line from a little before
the match, the rest on hover. Matching no longer ignores accents, as
Find doesn't.

Going to a command in All Panes brings its window to the front, selects
its tab and pane, scrolls to the line that matched and opens Find there
with the same query and options, current on that line, so ⌘G walks the
rest. A command no longer in the scrollback opens in the output viewer.
Arrow keys only move the selection there, since going can switch tabs
and windows.

Pane.rows(of:) used to forget a command's place when its pane had no
window to measure rows in, as in a tab that isn't selected; searching
every pane would have done that to every background pane, so it now
leaves them alone.

Tests cover the filter's options, the match and its excerpt, place names,
the menu item and an end-to-end search over three panes in two tabs with
zsh. Docs and screenshots are updated.

Closes #21.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search every pane's output at once

1 participant